/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.udistrital.framework.adminMenu.modelo;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author nrodriguez
 */
@Entity
@Table(name = "amvxp")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Amvxp.findAll", query = "SELECT a FROM Amvxp a"),
    @NamedQuery(name = "Amvxp.findByApxide", query = "SELECT a FROM Amvxp a WHERE a.amvxpPK.apxide = :apxide"),
    @NamedQuery(name = "Amvxp.findByAopide", query = "SELECT a FROM Amvxp a WHERE a.amvxpPK.aopide = :aopide"),
    @NamedQuery(name = "Amvxp.findByAvxcon", query = "SELECT a FROM Amvxp a WHERE a.avxcon = :avxcon")})
public class Amvxp implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected AmvxpPK amvxpPK;
    @Column(name = "avxcon")
    private String avxcon;

    public Amvxp() {
    }

    public Amvxp(AmvxpPK amvxpPK) {
        this.amvxpPK = amvxpPK;
    }

    public Amvxp(int apxide, int aopide) {
        this.amvxpPK = new AmvxpPK(apxide, aopide);
    }

    public AmvxpPK getAmvxpPK() {
        return amvxpPK;
    }

    public void setAmvxpPK(AmvxpPK amvxpPK) {
        this.amvxpPK = amvxpPK;
    }

    public String getAvxcon() {
        return avxcon;
    }

    public void setAvxcon(String avxcon) {
        this.avxcon = avxcon;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (amvxpPK != null ? amvxpPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Amvxp)) {
            return false;
        }
        Amvxp other = (Amvxp) object;
        if ((this.amvxpPK == null && other.amvxpPK != null) || (this.amvxpPK != null && !this.amvxpPK.equals(other.amvxpPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.udistrital.ud.modelo.Amvxp[ amvxpPK=" + amvxpPK + " ]";
    }
    
}
